package com.rapiddevsample;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.v.rapiddev.base.AppManager;
import com.v.rapiddev.swipebacklayout.SwipeBackActivity;

/**
 * ClassType:
 * User:wenyunzhao
 * ProjectName:RapidDevSample
 * Package_Name:com.rapiddevsample
 * Created on 2016-11-24 22:13
 */

public abstract class BaseActivity extends SwipeBackActivity {
    public Activity context;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        context = this;
        AppManager.getAppManager().addActivity(this);
        init();
    }

    @Override
    protected void onResume() {
        super.onResume();
        resume();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        destroy();
    }

    public abstract void init();

    public abstract void resume();


    public abstract void destroy();

}
